<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

$this->group(['prefix' => 'auth'], function() {
    //登陆
	$this->get('/', 'LoginController@showLoginForm');
	$this->post('/login', 'LoginController@login')->middleware(['throttle:10,1']);
	$this->post('/logout', 'LoginController@logout');

	//注册验证手机号
	$this->post('/register/phone/check', 'RegisterController@phoneCheck')->middleware(['throttle:10,1']);
	//注册发送手机验证码
	$this->post('/register/phone/code', 'RegisterController@sendCode');
	//注册验证手机验证码
	$this->post('/register/phone/code/check', 'RegisterController@checkCode')->middleware(['throttle:10,1']);
	//手机注册
	$this->post('/register/phone', 'RegisterController@phoneRegister')->middleware(['throttle:10,1']);

	//找回密码验证手机号
	$this->post('/password/phone/check', 'ResetPasswordController@phoneCheck')->middleware(['throttle:10,1']);
	//找回密码发送手机验证码
	$this->post('/password/phone/code', 'ResetPasswordController@sendCode')->middleware(['throttle:1,1']);
	//找回密码验证手机验证码
	$this->post('/password/phone/code/check', 'ResetPasswordController@checkCode')->middleware(['throttle:10,1']);
	//密码重置
	$this->post('/password/phone', 'ResetPasswordController@phonePassword')->middleware(['throttle:10,1']);

});

